package sapling.logic.algorithm.pcb.dispatcher;

import sapling.main.OSEnvironment;

public abstract class Dispatcher {

	protected OSEnvironment env;

	public Dispatcher(OSEnvironment env) {
		this.env = env;
	}

	/**
	 *
	 * @return 返回是否切换结束
	 */
	abstract protected boolean switchOver();

	public boolean switchPCB() {
		if (this.env.getPcbRunning()==null)
			return true;
		return this.switchOver();
	}

}
